Invoice Accounts Creation
POST /api/v1/InvoiceAccounts
Description
This endpoint is used to create an Invoice Account. It expects a CreateInvoiceAccountRequest object in the request body. It returns an InvoiceAccountResponse object containing the newly created Invoice Account details.
Headers:
- Content-Type: application/json
ApiKey:
- No API key required
Path Parameters:
- version: string, required
Request Body:
- CreateInvoiceAccountRequest: object
URL:
- POST:
{{baseUrl API url}}/api/v1/InvoiceAccounts
Response:
- An InvoiceAccountResponse object containing the newly created Invoice Account details.
Error Codes:
-
400: Bad Request
-
404: Resource not found
-
500: Internal server error
Example Request URL:
POST /api/v1/InvoiceAccounts
Content-Type: application/json
{
"accountName": "Acme Inc.",
"accountNumber": "ACME001",
"description": "The account for Acme Inc.",
"isActive": true,
"currencyCode": "USD",
"createdBy": "John Doe",
"createdDate": "2024-02-18T14:45:00Z"
}
Example Response:
HTTP/1.1 200 OK
{
"accountId": "98f2d2e5-6140-4f19-9b58-48c5003e92f7",
"accountName": "Acme Inc.",
"accountNumber": "ACME001",
"description": "The account for Acme Inc.",
"isActive": true,
"currencyCode": "USD",
"createdBy": "John Doe",
"createdDate": "2024-02-18T14:45:00Z"
}
Method: POST
/api/v1/InvoiceAccounts
Headers
| Content-Type | Value |
|---|---|
Content-Type | application/json |
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Body (raw)
{
"accountProvider": 2,
"countryId": "<long>",
"accountName": "<string>",
"pin": "<string>",
"merchantId": "<uuid>"
}
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"id": "<uuid>",
"merchantId": "<uuid>",
"accountName": "<string>",
"accountNumber": "<string>",
"walletID": "<string>",
"bankName": "<string>",
"lastActivity": "<dateTime>",
"priorDayBalance": "<double>",
"availableBalance": "<double>"
}
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/InvoiceAccounts \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!